home *** CD-ROM | disk | FTP | other *** search
/ Aminet 32 / Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso / Aminet / disk / misc / ADFlib.lha / Lib / adf_file.h < prev    next >
C/C++ Source or Header  |  1999-02-09  |  1KB  |  40 lines

  1. #ifndef ADF_FILE_H
  2. #define ADF_FILE_H 1
  3.  
  4. /*
  5.  *  ADF Library. (C) 1997-1998 Laurent Clevy
  6.  *
  7.  *  adf_file.h
  8.  *
  9.  */
  10.  
  11. #include"prefix.h"
  12.  
  13. #include"adf_str.h"
  14.  
  15. RETCODE adfFreeFileBlocks(struct Volume* vol, struct bFileHeaderBlock *entry);
  16. PREFIX long adfFileRealSize(unsigned long size, int blockSize, long *dataN, long *extN);
  17.  
  18. long adfPos2DataBlock(long pos, int blockSize, int *posInExtBlk, int *posInDataBlk, long *curDataN );
  19.  
  20. RETCODE adfWriteFileHdrBlock(struct Volume *vol, SECTNUM nSect, struct bFileHeaderBlock* fhdr);
  21.  
  22. RETCODE adfReadDataBlock(struct Volume *vol, SECTNUM nSect, void *data);
  23. RETCODE adfWriteDataBlock(struct Volume *vol, SECTNUM nSect, void *data);
  24. RETCODE adfReadFileExtBlock(struct Volume *vol, SECTNUM nSect, struct bFileExtBlock* fext);
  25. RETCODE adfWriteFileExtBlock(struct Volume *vol, SECTNUM nSect, struct bFileExtBlock* fext);
  26.  
  27. PREFIX struct File* adfOpenFile(struct Volume *vol, char* name, char *mode);
  28. PREFIX void adfCloseFile(struct File *file);
  29. PREFIX long adfReadFile(struct File* file, long n, unsigned char *buffer);
  30. PREFIX BOOL adfEndOfFile(struct File* file);
  31. RETCODE adfReadNextFileBlock(struct File* file);
  32. PREFIX long adfWriteFile(struct File *file, long n, unsigned char *buffer);
  33. SECTNUM adfCreateNextFileBlock(struct File* file);
  34. PREFIX void adfFlushFile(struct File *file);
  35.  
  36.  
  37.  
  38. #endif /* ADF_FILE_H */
  39.  
  40.